package entity;

/**
 * @author Rain
 * @Description :
 * @date 2022/08/18 16:18
 */
public class Wife implements Person {
    private String name;
    private String sex;

    public Wife(String name) {
        this.name = name;
    }

    public Wife(String name, String sex) {
        this.name = name;
        this.sex = sex;
    }

    public Wife() {
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void eat() {
        System.out.println("老婆来了");
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Wife{");
        sb.append("name='").append(name).append('\'');
        sb.append(", sex='").append(sex).append('\'');
        sb.append('}');
        return sb.toString();
    }
}
